import loginView from '@/views/loginView.vue'
import Layout from '@/layout/index.vue'
import DashboardView from '@/views/DashboardView.vue'

const routes = [
  {
    path: '/login',
    name: 'login',
    component: loginView,
  },
  {
    path: '/',
    name: 'layout',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        component: DashboardView,
        meta: {
          title: 'Dashboard',
          icon: 'dashboard',
          requiresAuth: true,
        },
      },
    ],
  },
]

export default routes
